package cn.hsp.login.controller;

import cn.hsp.login.bean.response.Resp;
import cn.hsp.login.service.AuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BlogRestController {

    @Autowired
    private AuthService authService;

    @PostMapping(value = "/query")
    public Resp<String> query() {
        long userId = authService.getLogInUserId();
        String data = "当前用户Id:" + userId;
        Resp<String> resp = new Resp<>();
        resp.setData(data);
        return resp;
    }

}
